//   acwing 1262     https://www.acwing.com/problem/content/1264/


#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

const int N = 110;

int a[N], d[N], l[N], spend[N];

int get(int k)
{
    return max(0, a[k] - d[k] * spend[k]);
}

int work(int n, int T)
{
    int res = 0;
    memset(spend, 0, sizeof spend);

    for (int t = 0; t < T; t++)
    {
        int i = 1;
        for (int j = 2; j <= n; j++)
            if (get(i) < get(j))
                i = j;

        res += get(i);
        spend[i]++;
    }

    return res;
}

int main()
{
    int n, T;
    scanf("%d", &n);

    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) scanf("%d", &d[i]);
    for (int i = 2; i <= n; i++)
    {
        scanf("%d", &l[i]);
        l[i] += l[i - 1];
    }
    scanf("%d", &T);

    int res = 0;
    for (int i = 1; i <= n; i++)
        res = max(res, work(i, T - l[i]));

    printf("%d\n", res);
    return 0;
}